<template>
  <div>
    {{count}}
    <button @click="handleAsyncIncrement">async +1</button>
  </div>
</template>
<script>
export default {
  computed: {
    count() {
      return this.$store.state.count;
    }
  },
  methods: {
    handleAsyncIncrement() {
      this.$store.dispatch("asyncIncrement", () => {
        console.log(this.$store.state.count); //1
      });
    }
  }
};
</script>